package org.cs.publics.model;
// Generated 2018-12-28 17:39:08 by Hibernate Tools 5.2.3.Final

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * BindCard generated by hbm2java
 */
@Entity
@Table(name = "bind_card", catalog = "good_fresh")
public class BindCard implements java.io.Serializable {

	private int bindCardId;
	private UserInfo userInfo;
	private String bindCardName;
	private String bindCradBank;
	private Date bindCradCreateTime;
	private Date createTime;
	private Date updateTime;
	private String bindCardHoldOne;
	private String bindCardHoldTwo;
	private Set<ExtractMonery> extractMoneries = new HashSet<ExtractMonery>(0);

	public BindCard() {
	}

	public BindCard(int bindCardId) {
		this.bindCardId = bindCardId;
	}

	public BindCard(int bindCardId, UserInfo userInfo, String bindCardName, String bindCradBank,
			Date bindCradCreateTime, Date createTime, Date updateTime, String bindCardHoldOne, String bindCardHoldTwo,
			Set<ExtractMonery> extractMoneries) {
		this.bindCardId = bindCardId;
		this.userInfo = userInfo;
		this.bindCardName = bindCardName;
		this.bindCradBank = bindCradBank;
		this.bindCradCreateTime = bindCradCreateTime;
		this.createTime = createTime;
		this.updateTime = updateTime;
		this.bindCardHoldOne = bindCardHoldOne;
		this.bindCardHoldTwo = bindCardHoldTwo;
		this.extractMoneries = extractMoneries;
	}

	@Id

	@Column(name = "BIND_CARD_ID", unique = true, nullable = false)
	public int getBindCardId() {
		return this.bindCardId;
	}

	public void setBindCardId(int bindCardId) {
		this.bindCardId = bindCardId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "USER_INFO_ID")
	public UserInfo getUserInfo() {
		return this.userInfo;
	}

	public void setUserInfo(UserInfo userInfo) {
		this.userInfo = userInfo;
	}

	@Column(name = "BIND_CARD_NAME", length = 25)
	public String getBindCardName() {
		return this.bindCardName;
	}

	public void setBindCardName(String bindCardName) {
		this.bindCardName = bindCardName;
	}

	@Column(name = "BIND_CRAD_BANK", length = 60)
	public String getBindCradBank() {
		return this.bindCradBank;
	}

	public void setBindCradBank(String bindCradBank) {
		this.bindCradBank = bindCradBank;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "BIND_CRAD_CREATE_TIME", length = 19)
	public Date getBindCradCreateTime() {
		return this.bindCradCreateTime;
	}

	public void setBindCradCreateTime(Date bindCradCreateTime) {
		this.bindCradCreateTime = bindCradCreateTime;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "CREATE_TIME", length = 19)
	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "UPDATE_TIME", length = 19)
	public Date getUpdateTime() {
		return this.updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	@Column(name = "BIND_CARD_HOLD_ONE", length = 25)
	public String getBindCardHoldOne() {
		return this.bindCardHoldOne;
	}

	public void setBindCardHoldOne(String bindCardHoldOne) {
		this.bindCardHoldOne = bindCardHoldOne;
	}

	@Column(name = "BIND_CARD_HOLD_TWO", length = 25)
	public String getBindCardHoldTwo() {
		return this.bindCardHoldTwo;
	}

	public void setBindCardHoldTwo(String bindCardHoldTwo) {
		this.bindCardHoldTwo = bindCardHoldTwo;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "bindCard")
	public Set<ExtractMonery> getExtractMoneries() {
		return this.extractMoneries;
	}

	public void setExtractMoneries(Set<ExtractMonery> extractMoneries) {
		this.extractMoneries = extractMoneries;
	}

}
